package com.itheima.stock.exception;


import com.itheima.stock.enums.Code;

/**
 * Exceptions
 *
 * 异常抛出工具类
 *
 * @author DanLi
 * @date 2025/7/13
 */
public class Exceptions extends RuntimeException {
    /**
     * 对抛出异常代码进行封装
     *
     * @param code
     */
    public static void cast(Code code) {
        throw new StockException(code);
    }

    /**
     * 构造私有
     * @param message
     */
    private Exceptions(String message) {
        super(message);
    }
}
